<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div class="layui-form">
    <div class="layui-form-item">
        <label class="layui-form-label">姓名</label>
        <div class="layui-input-inline">
            <input type="text" autocomplete="off" class="layui-input" value="{$user_card.card_name}" readonly="readonly">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">手机号</label>
        <div class="layui-input-inline">
            <input type="text" autocomplete="off" class="layui-input" value="{$user_card.card_phone}" readonly="readonly">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">银行</label>
        <div class="layui-input-inline">
            <input type="text" autocomplete="off" class="layui-input" value="{$user_card.list_name}" readonly="readonly">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">银行卡号</label>
        <div class="layui-input-inline">
            <input type="text" autocomplete="off" class="layui-input" value="{$user_card.card_no}" readonly="readonly">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">当前可还款余额</label>
        <div class="layui-input-inline">
            <input type="text" autocomplete="off" class="layui-input" value="{$user_card.query_balance}" readonly="readonly">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">还款手续费</label>
        <div class="layui-input-inline">
            <input type="text" autocomplete="off" class="layui-input" value="2.00" readonly="readonly">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label"></label>
        <div class="layui-input-inline">
            <input type="hidden" name="plan_id" value="{$plan_id}">
            <button class="layui-btn" lay-submit lay-filter="sub">立即还款</button>
        </div>
    </div>
</div>
<link rel="stylesheet" href="__PLUS__/layui/css/layui.css">
<script src="__PLUS__/layui/layui.js"></script>
<script>
    layui.use(["layer","form","jquery"],function(){
        var layer = layui.layer;
        var form = layui.form;
        var $ = layui.jquery;

        form.on("submit(sub)",function(res){
            var data = res.field;
            console.log(data);
            $.post("",data,function(res){
                layer.alert(res.errtext);
            });
            return false;
        });
    })
</script>
</body>
</html>